from langchain_google_genai import ChatGoogleGenerativeAI
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage
from langgraph.graph import END, MessageGraph

llm = ChatGoogleGenerativeAI(model="models/gemini-1.5-pro-latest", temperature=0.7)

graph = MessageGraph()

graph.add_node("oracle", llm)
graph.add_edge("oracle", END)

graph.set_entry_point("oracle")

runnable = graph.compile()

result = runnable.invoke(HumanMessage("What is 1 + 1?"))
print(result)